package com.qf.service.Impl;

import com.qf.entity.BuyPlan;
import com.qf.mapper.BuyPlanMapper;
import com.qf.service.BuyPlanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
 * --- 天道酬勤 ---
 *
 * @author Hulboy
 * @date 2024/7/23
 * @desc --- 代码敲烂 月薪过万 ---
 */

@Service
public class BuyPlanServiceImpl implements BuyPlanService {

    @Autowired
    private BuyPlanMapper buyPlanMapper;

    // @Override
    // public List<BuyPlan> findAll() {
    //     List<BuyPlan> buyPlans = buyPlanMapper.findAll();
    //     return buyPlans;
    // }

    @Override
    public List<BuyPlan> findBll(HashMap<String, String> map) {
        return buyPlanMapper.findBll(map);
    }

    @Override
    public boolean delBatch(List<Integer> ids) {
        return buyPlanMapper.delBatch(ids);
    }


    @Override
    public boolean addBuyPlan(BuyPlan plan) {
        return buyPlanMapper.addBuyPlan(plan);
    }

    @Override
    public boolean edit(BuyPlan plan) {
        return buyPlanMapper.edit(plan);
    }

    @Override
    public boolean deleteById(int id) {
        return buyPlanMapper.deleteById(id);
    }
}
